package com.yinian.cart.repository;


import com.yinian.cart.entity.CartList;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface CartListRepository  extends JpaRepository<CartList, String>, JpaSpecificationExecutor {
    CartList findByProductIdAndUserAccount(String productId,int userAccount);

    CartList findByCartIdAndUserAccount(String cartId,int userAccount);

    int deleteByCartId(String cartId);

    List<CartList> findAllByUserAccountOrderByAddTimeAsc(int userAccount);
}
